var t = getApp();

Page({
    data: {
        page: 1,
        info: []
    },
    onLoad: function(t) {
        t.id && t.name && this.setData({
            id: t.id,
            name: decodeURI(t.name)
        }), wx.setNavigationBarTitle({
            title: this.data.name
        });
        var a = wx.getStorageSync("langIndex");
        this.setData({
            language: a.en
        }), this.getdata();
    },
    goDetail: function(t) {
        console.log(t);
        var a = t.currentTarget.dataset.id;
        wx.navigateTo({
            url: "/packageH/cpsDetail/cpsDetail?id=" + a
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getdata: function() {
        wx.showLoading({
            title: "加载中"
        });
        var a = this, n = t.getNetAddresss("plugin.aggregation-cps.api.equity.goods-list");
        t._getNetWork({
            url: n,
            data: {
                brand_id: a.data.id
            },
            success: function(t) {
                var n = t.data;
                wx.hideLoading(), 1 == n.result ? a.setData({
                    info: n.data.data
                }) : wx.showToast({
                    title: n.msg,
                    duration: 1e3,
                    icon: "none"
                });
            },
            fail: function(t) {
                console.log(t.msg);
            }
        });
    }
});